package org.example.springboot.repository;

import org.example.springboot.entity.ExpertChat;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;

public interface ExpertChatRepository extends JpaRepository<ExpertChat, Long> {
    List<ExpertChat> findByUserIdAndExpertIdOrderBySendTimeAsc(Long userId, Long expertId);
    List<ExpertChat> findByUserIdOrderBySendTimeAsc(Long userId);
    List<ExpertChat> findByExpertIdOrderBySendTimeAsc(Long expertId);

    List<ExpertChat> findByExpertIdAndUserId(Long expertId, Long userId);
}